﻿@using LotteryVoteMVC.Core
@using LotteryVoteMVC.Core.Application
@using LotteryVoteMVC.Models
@using LotteryVoteMVC.Resources
@model IEnumerable<LotteryVoteMVC.Models.LotteryCompany>
@{
    ViewBag.Title = Resource.FastBet2D;
    Layout = "~/Views/Shared/BetMain.cshtml";
}
@section Head{
    <script src="@Url.Content("~/Scripts/Customer/FastBet.js")?v=1.1" type="text/javascript"></script>
    <style type="text/css">
    table#betTable{width:100%;}
#betTable tbody label{font-size:26px}
#betTable tbody td{text-align:center}
span.splitHolder{display:inline-block;width:30px;}
    </style>
}
<div style="height: *; width: 100%; min-width: 800;">
    <table id="betTable">
        <thead>
            <tr>
                <td colspan="11">
                    @foreach (var company in Model)
                    {
                        <span style="padding-left: 1px; padding-right: 1px; display: inline-block; zoom: 1;">
                            <input name='company@(company.CompanyId)' company='@company.CompanyId'
                                id='company@(company.CompanyId)' type="checkbox" class='company'
                                region='@company.Region' />
                            <label for='company@(company.CompanyId)'>
                                @company.Abbreviation</label>
                        </span>
                    }
                    <span class="splitHolder"></span>
                    @foreach (GamePlayWay gpw in ViewBag.GamePlayWays)
                    { 
                        <span style="padding-left: 1px; padding-right: 1px; display: inline-block; zoom: 1;">
                            <input name='gpw@(gpw.Id)_@(gpw.GameId)_@(gpw.WayId)' gpw='@gpw.Id'
                                id='gpw@(gpw.Id)_@(gpw.GameId)_@(gpw.WayId)' type="checkbox" class='gpw'/>
                            <label for='gpw@(gpw.Id)_@(gpw.GameId)_@(gpw.WayId)'>
                                @Extended.GetGPWDescription(gpw.Id)</label>
                        </span>
                    }
                    <span class="splitHolder"></span> @Resource.Wager
                    <input type="text" name="amount" id="amount" style="width: 80px;" />
                    <span style="float:right;margin-right:150px">@Resource.TotalAmount:<span id="totalAmount" style="color:red"></span></span>
                </td>
            </tr>
            <tr id="title">
                @for (int i = 0; i < 10; i++)
                { 
                    <td>
                        <input type="checkbox" class="ck_row" value="@i" />
                    </td>
                }
                <td>
                </td>
            </tr>
        </thead>
        <tbody>
            @for (int i = 0; i < 10; i++)
            {
                <tr @(i == 0 ? "class=first" : "")>
                    @for (int j = 0; j < 10; j++)
                    {
                        <td>
                            <input type="checkbox" id="num@(i)@(j)" name="num@(i)@(j)" class="num" value='@i@j' row="@i" col="@j" />
                            <label for="num@(i)@(j)">@i@j</label>
                        </td>
                    }
                    <td>
                        <input type="checkbox" class="ck_cols" />
                    </td>
                </tr>                    
            }
        </tbody>
    </table>
</div>
